package com.group.controller;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.group.pojo.TbDevice;
import com.group.service.DeviceService;

@Controller
@RequestMapping("/device")
public class DeviceController {
	@Autowired
	private DeviceService deviceService;

	// 跳转设备管理页面
	@RequestMapping("/page.action")
	public String page() {
		return "info/device/device";
	}

	// 获得所有的设备信息
	@RequestMapping("/query.action")
	@ResponseBody
	public List<TbDevice> query(TbDevice device) {
		return deviceService.query(device);
	}
	
}
